import { IFeidaoAiBrowserComponent } from '@feidao/web/interfaces';
import Select from "@feidao/widgets/fd-w000004";

export default async function a005(fd: IFeidaoAiBrowserComponent, ...args: any[]) {
	const v = fd.data.node.querySelector<HTMLInputElement>('[name="a"]').value;
	if (!v) {
		alert('请选择是否为禁用');
	} else {
		const w = fd.data.node.querySelector<Select>('[data-feidao-id="fd-w000004-001"]');
		w.set_disabled(((v === 'true') ? true : false));
	}
	fd.data.node.querySelector<HTMLAreaElement>('[data-feidao-id="fd-w000004-003"]').innerHTML = `
const v = fd.data.node.querySelector<HTMLInputElement>('[name="a"]').value;
if (!v) {
	alert('请选择是否为禁用');
} else {
	const w = fd.data.node.querySelector<Select>('[data-feidao-id="fd-w000004-001"]');
	w.set_disabled(((v === 'true') ? true : false));
}
	`;
}
